package com.springboot.astra.service.serviceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.springboot.astra.bean.UserRoles;
import com.springboot.astra.mapper.UserRolesMapper;
import com.springboot.astra.service.UserRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserRolesServiceImpl implements UserRolesService {
    @Autowired
    UserRolesMapper userRolesMapper;
    @Override
    public UserRoles getOneById(Integer id) {
        return userRolesMapper.getOneById(id);
    }

    @Override
    public IPage<UserRoles> getAll(Page<UserRoles> page, String query) {
        return userRolesMapper.getAll(page,query);
    }


    @Override
    public void insertUserRoles(UserRoles userRoles) {
        userRolesMapper.insertUserRoles(userRoles);
    }

    @Override
    public void updateOneById(UserRoles userRoles) {
        userRolesMapper.updateOneById(userRoles);
    }

    @Override
    public void deleteOneById(Integer id) {
        userRolesMapper.deleteOneById(id);
    }

    @Override
    public UserRoles isExact(UserRoles userRoles) {
        return userRolesMapper.isExact(userRoles);
    }

}
